<template>
    <div>
        <el-row class="header">
            <span class="title-medium text-importent">病理切片</span>
        </el-row>
        <el-row class="header">
            <el-col
                style="margin-top: 20px; margin-right: 20px;width: 361px;"
                scoped
                v-for="(file, index) in biopsyList"
                :key="index"
            >
                <el-card :body-style="{ padding: '20px' }">
                    <el-row>
                        <div @click="exclude(file)">
                            <img
                                :src="imageServiceURL+file.labelUrl"
                                class="image"
                            >
                            <img
                                :src="imageServiceURL+file.previewUrl"
                                class="image"
                            >
                        </div>
                    </el-row>
                    <el-row class="line-text">
                        <span>切片标签：{{ file.sliceLabel }}</span>
                    </el-row>
                    <el-row class="line-text">
                        <span>切片类别：{{ file.sliceCategoryName }}</span>
                    </el-row>
                    <el-row class="line-text">
                        <span>切片用途：{{ file.slicePurposeName }}</span>
                    </el-row>
                    <el-row class="line-text">
                        <span>扫描号：{{ file.scannerSerialNumber }}</span>
                    </el-row>
                    <el-row class="line-text">
                        <span>扫描仪号：{{ file.scannerNumber }}</span>
                    </el-row>
                    <el-row class="line-text">
                        <span>扫描倍率：{{ file.level }}</span>
                    </el-row>
                    <el-row class="line-text">
                        <span>扫描时间：{{ file.updateTime }}</span>
                    </el-row>
                    <el-row class="line-text">
                        <span>切片质量：{{ file.biopsyQuality }}</span>
                    </el-row>
                    <el-row class="line-text">
                        <span>扫描仪品牌型号：{{ file.scannerBrandModel }}</span>
                    </el-row>
                    <el-row class="line-text">
                        <span>扫描清晰度：{{ file.scanDefinition }}</span>
                    </el-row>
                    <el-row class="line-text">
                        <span>病理编号：{{ file.pathologyId }}</span>
                    </el-row>
                    <el-row class="line-text">
                        <span>扫描员：{{ file.createUserName }}</span>
                    </el-row>
                    <el-row class="line-text">
                        <span>上传时间：{{ file.createTime }}</span>
                    </el-row>
                    <el-row class="line-text">
                        <span>切片描述：{{ file.description }}</span>
                    </el-row>
                    <el-row class="line-text">
                        <span>医院名称：{{ file.sliceHospitalName }}</span>
                    </el-row>
                    <el-row class="line-text">
                        <span>分院名称：{{ file.branchName }}</span>
                    </el-row>
                    
                </el-card>
            </el-col>
        </el-row>

    </div>
</template>

<script>
export default {
    name: 'DiagnosisMatchDetailPathologyList',
    props: {
        biopsyList: Array,
    },
    data() {
        return {
            imageServiceURL: process.env.ImageServiceURL, // 图片服务器地址
            labelUrl: '', // 标签图地址
            pathologyFilesViewer: '', // 医生工作站地址
        };
    },
    mounted() {},
    methods: {
        exclude(val) {
            const { state } = this.$store;
            const { href } = this.$router.resolve({
                name: 'Viewer',
                path: '/Viewer',
                query: {
                    fileName: val.newFilename,
                    originFilename: val.originFilename,
                    pathologyId: val.pathologyId,
                    biopsyId: val.id,
                    authorization: this.$store.state.authorization,
                    userId: state.user.id,
                    pDiagnosisType: '',
                },
            });
            const width = window.screen.availWidth + 10;
            const height = window.screen.availHeight + 10;
            window.open(
                href,
                'doctorWorkstation',
                `location=no,width=${width},height=${height}`
            );
        },
    },
};
</script>

<style scoped>
.header {
    margin-top: 20px;

    font-size: 14px;
}

.image {
    height: 138px;

    width: 138px;

    margin-left: 15px;
}
</style>
